package com.wanlian.jpush.push.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonInclude(Include.NON_EMPTY)
public class Notification implements ICheckable {
	@JsonProperty(value = "android")
	private NotificationAndroid androidNotification;

	@JsonProperty(value = "ios")
	private NotificationIOS iosNotifycation;

	public NotificationAndroid getAndroidNotification() {
		return androidNotification;
	}

	public void setAndroidNotification(NotificationAndroid androidNotification) {
		this.androidNotification = androidNotification;
	}

	public NotificationIOS getIosNotifycation() {
		return iosNotifycation;
	}

	public void setIosNotifycation(NotificationIOS iosNotifycation) {
		this.iosNotifycation = iosNotifycation;
	}

	@Override
	public boolean checkIsAble() {
		if (androidNotification == null && iosNotifycation == null) {
			return false;
		} else {
			if (androidNotification != null && androidNotification.checkIsAble()) {
				if (iosNotifycation != null) {
					if (iosNotifycation.checkIsAble()) {
						return true;
					}
				} else {
					return true;
				}
			}
		}
		return false;
	}
}
